﻿using FreeSql.DataAnnotations;
using KrasDD.Attributes;

namespace KrasDD.Models
{

    [JsonObject(MemberSerialization.OptIn), Table(Name = "[innovator].[FILE]", DisableSyncStructure = false)]
    [ItemType("7F83A1B4C5D6E7F8A9B0C1D2E3F4A5BB", "FILE")]
    public partial class FILE : AppBaseEntity
    {

        [JsonProperty, Column(StringLength = 256)]
        public string CHECKEDOUT_PATH { get; set; }

        [JsonProperty, Column(StringLength = 64)]
        public string CHECKSUM { get; set; }

        [JsonProperty, Column(DbType = "decimal(14,0)")]
        public decimal? FILE_SIZE { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string FILE_TYPE { get; set; }

        [JsonProperty, Column(StringLength = 256, IsNullable = false)]
        public string FILENAME { get; set; }

        [JsonProperty, Column(StringLength = 64)]
        public string LABEL { get; set; }

        [JsonProperty, Column(StringLength = 128)]
        public string MIMETYPE { get; set; }


        #region 外键 => 导航属性，OneToMany

        [Navigate("RELATED_ID")]
        public virtual List<DOCUMENT_FILE> DOCUMENT_FILES { get; set; }


        #endregion
    }

}
